VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "msflxgrd.ocx"
Object = "{736A8444-E374-41A8-B526-1B07FD2F3F5B}#1.0#0"; "BLacKPeaRLOCX.ocx"
Begin VB.Form FrmLaporanBilling 
   BackColor       =   &H00000000&
   Caption         =   "Rekapitulasi Billing"
   ClientHeight    =   9600
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   11160
   Icon            =   "FrmLaporanBilling.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   9600
   ScaleWidth      =   11160
   StartUpPosition =   2  'CenterScreen
   Begin BLacKPeaRLOCX.Resize Resize1 
      Left            =   4920
      Top             =   4560
      _ExtentX        =   847
      _ExtentY        =   847
   End
   Begin BLacKPeaRLOCX.BLacKFrame BLacKFrame1 
      Height          =   9615
      Left            =   0
      TabIndex        =   18
      Top             =   0
      Width           =   11175
      _ExtentX        =   19711
      _ExtentY        =   16960
      BackColor1      =   4210752
      BackColor2      =   0
      BackGradient    =   1
      Caption         =   ""
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   8421504
      TitleColor1     =   8421504
      TitleColor2     =   0
      TitleGradient   =   2
      TitleHeight     =   350
      BorderColor     =   1184274
      BorderWidth     =   2
      Begin BLacKPeaRLOCX.BLacKFrame BLacKFrame7 
         Height          =   6255
         Left            =   120
         TabIndex        =   24
         Top             =   360
         Width           =   10935
         _ExtentX        =   19288
         _ExtentY        =   11033
         BackColor1      =   4210752
         BackColor2      =   0
         BackGradient    =   0
         Caption         =   ""
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   255
         TitleColor1     =   4210752
         TitleColor2     =   0
         TitleGradient   =   0
         TitleHeight     =   350
         BorderColor     =   49152
         Begin MSFlexGridLib.MSFlexGrid GridLaporan 
            Height          =   6015
            Left            =   120
            TabIndex        =   25
            Top             =   120
            Width           =   10695
            _ExtentX        =   18865
            _ExtentY        =   10610
            _Version        =   393216
            Cols            =   12
            FixedCols       =   0
            BackColor       =   0
            ForeColor       =   49152
            BackColorFixed  =   3223853
            ForeColorFixed  =   49152
            ForeColorSel    =   49152
            BackColorBkg    =   0
            GridColor       =   16384
            GridColorFixed  =   16384
            BorderStyle     =   0
            Appearance      =   0
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   -1  'True
               Strikethrough   =   0   'False
            EndProperty
         End
      End
      Begin BLacKPeaRLOCX.BLacKFrame BLacKFrame6 
         Height          =   735
         Left            =   120
         TabIndex        =   23
         Top             =   8760
         Width           =   10935
         _ExtentX        =   19288
         _ExtentY        =   1296
         BackColor1      =   0
         BackColor2      =   0
         BackGradient    =   0
         Caption         =   ""
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   255
         TitleColor1     =   4210752
         TitleColor2     =   0
         TitleGradient   =   0
         TitleHeight     =   200
         BorderColor     =   49152
         Begin BLacKPeaRLOCX.ButtonNix cmdclr 
            Height          =   495
            Left            =   7440
            TabIndex        =   31
            Top             =   120
            Width           =   1455
            _ExtentX        =   2566
            _ExtentY        =   873
            BTYPE           =   5
            TX              =   "Hapus Yang Dibatalkan"
            ENAB            =   -1  'True
            BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            COLTYPE         =   2
            FOCUSR          =   0   'False
            BCOL            =   1184274
            BCOLO           =   16777215
            FCOL            =   49152
            FCOLO           =   49152
            MCOL            =   12632256
            MPTR            =   1
            MICON           =   "FrmLaporanBilling.frx":B532
            UMCOL           =   -1  'True
            SOFT            =   0   'False
            PICPOS          =   0
            NGREY           =   0   'False
            FX              =   0
            HAND            =   0   'False
            CHECK           =   0   'False
            VALUE           =   0   'False
         End
         Begin BLacKPeaRLOCX.ButtonNix CmdTutup 
            Height          =   495
            Left            =   9240
            TabIndex        =   17
            Top             =   120
            Width           =   1455
            _ExtentX        =   2566
            _ExtentY        =   873
            BTYPE           =   5
            TX              =   "Tutup"
            ENAB            =   -1  'True
            BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            COLTYPE         =   2
            FOCUSR          =   0   'False
            BCOL            =   1184274
            BCOLO           =   16777215
            FCOL            =   49152
            FCOLO           =   49152
            MCOL            =   12632256
            MPTR            =   1
            MICON           =   "FrmLaporanBilling.frx":B54E
            UMCOL           =   -1  'True
            SOFT            =   0   'False
            PICPOS          =   0
            NGREY           =   0   'False
            FX              =   0
            HAND            =   0   'False
            CHECK           =   0   'False
            VALUE           =   0   'False
         End
         Begin BLacKPeaRLOCX.ButtonNix cmdExport 
            Height          =   495
            Left            =   5640
            TabIndex        =   16
            Top             =   120
            Width           =   1455
            _ExtentX        =   2566
            _ExtentY        =   873
            BTYPE           =   5
            TX              =   "Pindah Ke Excel"
            ENAB            =   -1  'True
            BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            COLTYPE         =   2
            FOCUSR          =   0   'False
            BCOL            =   1184274
            BCOLO           =   16777215
            FCOL            =   49152
            FCOLO           =   49152
            MCOL            =   12632256
            MPTR            =   1
            MICON           =   "FrmLaporanBilling.frx":B56A
            UMCOL           =   -1  'True
            SOFT            =   0   'False
            PICPOS          =   0
            NGREY           =   0   'False
            FX              =   0
            HAND            =   0   'False
            CHECK           =   0   'False
            VALUE           =   0   'False
         End
         Begin BLacKPeaRLOCX.ButtonNix CmdCetakNota 
            Height          =   495
            Left            =   3840
            TabIndex        =   15
            Top             =   120
            Width           =   1455
            _ExtentX        =   2566
            _ExtentY        =   873
            BTYPE           =   5
            TX              =   "Cetak Nota"
            ENAB            =   -1  'True
            BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            COLTYPE         =   2
            FOCUSR          =   0   'False
            BCOL            =   1184274
            BCOLO           =   16777215
            FCOL            =   49152
            FCOLO           =   49152
            MCOL            =   12632256
            MPTR            =   1
            MICON           =   "FrmLaporanBilling.frx":B586
            UMCOL           =   -1  'True
            SOFT            =   0   'False
            PICPOS          =   0
            NGREY           =   0   'False
            FX              =   0
            HAND            =   0   'False
            CHECK           =   0   'False
            VALUE           =   0   'False
         End
         Begin BLacKPeaRLOCX.ButtonNix CmdCetakLaporan 
            Height          =   495
            Left            =   2040
            TabIndex        =   14
            Top             =   120
            Width           =   1455
            _ExtentX        =   2566
            _ExtentY        =   873
            BTYPE           =   5
            TX              =   "Cetak"
            ENAB            =   -1  'True
            BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            COLTYPE         =   2
            FOCUSR          =   0   'False
            BCOL            =   1184274
            BCOLO           =   16777215
            FCOL            =   49152
            FCOLO           =   49152
            MCOL            =   12632256
            MPTR            =   1
            MICON           =   "FrmLaporanBilling.frx":B5A2
            UMCOL           =   -1  'True
            SOFT            =   0   'False
            PICPOS          =   0
            NGREY           =   0   'False
            FX              =   0
            HAND            =   0   'False
            CHECK           =   0   'False
            VALUE           =   0   'False
         End
         Begin BLacKPeaRLOCX.ButtonNix CmdRefresh 
            Height          =   495
            Left            =   240
            TabIndex        =   13
            Top             =   120
            Width           =   1455
            _ExtentX        =   2566
            _ExtentY        =   873
            BTYPE           =   5
            TX              =   "Segarkan"
            ENAB            =   -1  'True
            BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            COLTYPE         =   2
            FOCUSR          =   0   'False
            BCOL            =   1184274
            BCOLO           =   16777215
            FCOL            =   49152
            FCOLO           =   49152
            MCOL            =   12632256
            MPTR            =   1
            MICON           =   "FrmLaporanBilling.frx":B5BE
            UMCOL           =   -1  'True
            SOFT            =   0   'False
            PICPOS          =   0
            NGREY           =   0   'False
            FX              =   0
            HAND            =   0   'False
            CHECK           =   0   'False
            VALUE           =   0   'False
         End
      End
      Begin BLacKPeaRLOCX.BLacKFrame t 
         Height          =   975
         Left            =   5280
         TabIndex        =   22
         Top             =   7680
         Width           =   5775
         _ExtentX        =   10186
         _ExtentY        =   1720
         BackColor1      =   0
         BackColor2      =   0
         BackGradient    =   0
         Caption         =   ""
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   255
         TitleColor1     =   4210752
         TitleColor2     =   0
         TitleGradient   =   0
         TitleHeight     =   200
         BorderColor     =   49152
         Begin VB.TextBox totkes 
            BackColor       =   &H00404040&
            BorderStyle     =   0  'None
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H0000C000&
            Height          =   250
            Left            =   2310
            Locked          =   -1  'True
            TabIndex        =   27
            Top             =   405
            Width           =   2655
         End
         Begin VB.Shape Shape16 
            BackColor       =   &H00004040&
            BackStyle       =   1  'Opaque
            BorderColor     =   &H00C0FFC0&
            Height          =   345
            Left            =   2280
            Shape           =   4  'Rounded Rectangle
            Top             =   360
            Width           =   2730
         End
         Begin VB.Label Label3 
            BackStyle       =   0  'Transparent
            Caption         =   "Total Keseluruhan:"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   -1  'True
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   720
            TabIndex        =   26
            Top             =   360
            Width           =   1575
         End
      End
      Begin BLacKPeaRLOCX.BLacKFrame BLacKFrame4 
         Height          =   855
         Left            =   5280
         TabIndex        =   21
         Top             =   6720
         Width           =   5775
         _ExtentX        =   10186
         _ExtentY        =   1508
         BackColor1      =   0
         BackColor2      =   0
         BackGradient    =   0
         Caption         =   ""
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   255
         TitleColor1     =   4210752
         TitleColor2     =   0
         TitleGradient   =   0
         TitleHeight     =   200
         BorderColor     =   49152
         Begin VB.ComboBox TxtTahun 
            BackColor       =   &H00000000&
            ForeColor       =   &H0000C000&
            Height          =   315
            Left            =   3480
            TabIndex        =   5
            Top             =   240
            Width           =   1575
         End
         Begin VB.ComboBox TxtBulan 
            BackColor       =   &H00000000&
            ForeColor       =   &H0000C000&
            Height          =   315
            Left            =   2160
            TabIndex        =   4
            Top             =   240
            Width           =   1095
         End
         Begin VB.ComboBox TxtTgl 
            Appearance      =   0  'Flat
            BackColor       =   &H00000000&
            ForeColor       =   &H0000C000&
            Height          =   315
            Left            =   840
            TabIndex        =   3
            Top             =   240
            Width           =   1095
         End
      End
      Begin BLacKPeaRLOCX.BLacKFrame BLacKFrame3 
         Height          =   1335
         Left            =   120
         TabIndex        =   20
         Top             =   7320
         Width           =   5055
         _ExtentX        =   8916
         _ExtentY        =   2355
         BackColor1      =   0
         BackColor2      =   0
         BackGradient    =   0
         Caption         =   ""
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   255
         TitleColor1     =   4210752
         TitleColor2     =   0
         TitleGradient   =   0
         TitleHeight     =   200
         BorderColor     =   49152
         Begin VB.OptionButton opbat 
            BackColor       =   &H00000000&
            Caption         =   "Transaksi yang di batalkan"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   2520
            Style           =   1  'Graphical
            TabIndex        =   30
            Top             =   600
            Width           =   2295
         End
         Begin VB.ComboBox cboop 
            BackColor       =   &H00000000&
            ForeColor       =   &H0000C000&
            Height          =   315
            Left            =   1560
            TabIndex        =   29
            Top             =   920
            Width           =   3255
         End
         Begin VB.OptionButton opop 
            BackColor       =   &H00000000&
            Caption         =   "Operator"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   240
            Style           =   1  'Graphical
            TabIndex        =   28
            Top             =   960
            Width           =   1215
         End
         Begin VB.OptionButton OpPay 
            BackColor       =   &H00000000&
            Caption         =   "PayFirst"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   3360
            Style           =   1  'Graphical
            TabIndex        =   8
            Top             =   120
            Width           =   1455
         End
         Begin VB.OptionButton OpPelajar 
            BackColor       =   &H00000000&
            Caption         =   "Pelajar"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   240
            Style           =   1  'Graphical
            TabIndex        =   9
            Top             =   360
            Width           =   1455
         End
         Begin VB.OptionButton OpGame 
            BackColor       =   &H00000000&
            Caption         =   "Game"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   1800
            Style           =   1  'Graphical
            TabIndex        =   10
            Top             =   360
            Width           =   1455
         End
         Begin VB.OptionButton OpPersonal 
            BackColor       =   &H00000000&
            Caption         =   "Personal"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   240
            Style           =   1  'Graphical
            TabIndex        =   6
            Top             =   120
            Width           =   1455
         End
         Begin VB.OptionButton OpMember 
            BackColor       =   &H00000000&
            Caption         =   "Member"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   1800
            Style           =   1  'Graphical
            TabIndex        =   7
            Top             =   120
            Width           =   1455
         End
         Begin VB.OptionButton OpKetik 
            BackColor       =   &H00000000&
            Caption         =   "Mengetik"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   3360
            Style           =   1  'Graphical
            TabIndex        =   11
            Top             =   360
            Width           =   1455
         End
         Begin VB.OptionButton OpSemua 
            BackColor       =   &H00000000&
            Caption         =   "Semua Jenis"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   240
            Style           =   1  'Graphical
            TabIndex        =   12
            Top             =   600
            Width           =   2295
         End
      End
      Begin BLacKPeaRLOCX.BLacKFrame BLacKFrame2 
         Height          =   495
         Left            =   120
         TabIndex        =   19
         Top             =   6720
         Width           =   5055
         _ExtentX        =   8916
         _ExtentY        =   873
         BackColor1      =   0
         BackColor2      =   0
         BackGradient    =   0
         Caption         =   ""
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   255
         TitleColor1     =   2565927
         TitleColor2     =   0
         TitleGradient   =   0
         TitleHeight     =   200
         BorderColor     =   49152
         Begin VB.OptionButton OpBulan 
            BackColor       =   &H00000000&
            Caption         =   "Per Bulan"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   1800
            MaskColor       =   &H00000000&
            Style           =   1  'Graphical
            TabIndex        =   1
            Top             =   120
            Width           =   1455
         End
         Begin VB.OptionButton OpTahun 
            BackColor       =   &H00000000&
            Caption         =   "Per Tahun"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   3360
            MaskColor       =   &H00000000&
            Style           =   1  'Graphical
            TabIndex        =   2
            Top             =   120
            Width           =   1455
         End
         Begin VB.OptionButton OpHari 
            BackColor       =   &H00000000&
            Caption         =   "Per Hari"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   240
            MaskColor       =   &H00000000&
            Style           =   1  'Graphical
            TabIndex        =   0
            Top             =   120
            Width           =   1455
         End
      End
   End
End
Attribute VB_Name = "FrmLaporanBilling"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub notaYes()
On Error GoTo hell
Dim lokasidata As String
Dim user As String
Dim namadata As String
Dim pass As String
Dim port As String
Dim datver As String
datver = FrmDatabases.txtdatabases.Text
lokasidata = FrmDatabases.txtlokda.Text
user = FrmDatabases.TxtUser.Text
namadata = FrmDatabases.txtnameda.Text
pass = FrmDatabases.txtpass.Text
port = FrmDatabases.txtport

RptFaktur.adod.CursorLocation = ddADOUseClient
RptFaktur.adod.ConnectionString = "Driver=" & datver & ";SERVER=" & lokasidata & ";PORT=" & port & ";DATABASE=" & namadata & ";USER=" & user & ";PASSWORD=" & pass & ";OPTION=3;"
 
RptFaktur.adod.Source = "Select * from penjualan where penjualan.nota='" & GridLaporan.TextMatrix(GridLaporan.Row, 0) & "'"


With RptFaktur
.lblwilayah.Caption = Format(Now, "DD MMMM YYYY")
.fldjenis.Text = GridLaporan.TextMatrix(GridLaporan.Row, 4)
.flddurasi.Text = GridLaporan.TextMatrix(GridLaporan.Row, 7)
.fldmulai.Text = GridLaporan.TextMatrix(GridLaporan.Row, 5)
.fldselesai.Text = GridLaporan.TextMatrix(GridLaporan.Row, 6)
.fldtotal = Format(GridLaporan.TextMatrix(GridLaporan.Row, 8), "#,###,###")
.lblnama2.Caption = GridLaporan.TextMatrix(GridLaporan.Row, 3)
.LblNama.Caption = FrmMain.usnm.Text
.fldws.Text = GridLaporan.TextMatrix(GridLaporan.Row, 2)
.lblNamaToko.Caption = FrmMain.Txtnama_warnet.Caption
.LblAlamat.Caption = FrmMain.Txtalamat1.Caption
.lblket.Caption = FrmMain.Txtalamat2.Caption
Unload Me
.Visible = True

End With

IfNoErr:
Exit Sub
hell:
 TulisError Err.Description, Err.Number, "noTaYes", Me.Name
 Resume IfNoErr

End Sub
Private Sub notaNo()
On Error GoTo hell
    Printer.PrintQuality = 300
    Printer.FontSize = 10
    Printer.ScaleLeft = 10
    Printer.ScaleTop = 10
    Printer.Print Tab(10); "Nota Pembayaran Client"
    Printer.Print Tab(10); setTanggal; Tab(30); ":"; Tab(35); Format(Now, "DD-MM-YYYY")
    Printer.Print Tab(10); setNo & setNota; Tab(30); ":"; Tab(35); GridLaporan.TextMatrix(GridLaporan.Row, 0)
    Printer.Print Tab(10); "-------------------------------"
    Printer.Print Tab(10); FrmMain.Txtnama_warnet
    Printer.Print Tab(10); FrmMain.Txtalamat1
    Printer.Print Tab(10); FrmMain.Txtalamat2
    Printer.Print Tab(10); "-------------------------------"
    Printer.Print Tab(10); setClient; Tab(30); ":"; Tab(35); GridLaporan.TextMatrix(GridLaporan.Row, 2)
    Printer.Print Tab(10); setNamaUser; Tab(30); ":"; Tab(35); GridLaporan.TextMatrix(GridLaporan.Row, 3)
    Printer.Print Tab(10); setJenis; Tab(30); ":"; Tab(35); GridLaporan.TextMatrix(GridLaporan.Row, 4)
    Printer.Print Tab(10); setMulai; Tab(30); ":"; Tab(35); GridLaporan.TextMatrix(GridLaporan.Row, 5)
    Printer.Print Tab(10); setSelesai; Tab(30); ":"; Tab(35); GridLaporan.TextMatrix(GridLaporan.Row, 6)
    Printer.Print Tab(10); setDurasi; Tab(30); ":"; Tab(35); GridLaporan.TextMatrix(GridLaporan.Row, 7)
    Printer.Print Tab(10); "Total jasa"; Tab(30); ":"; Tab(35); mata_uang & GridLaporan.TextMatrix(GridLaporan.Row, 8)
    Printer.Print Tab(10); "-------------------------------"
    Printer.Print Tab(10); "Diterima Oleh : " & FrmMain.nm.Text
    Printer.Print Tab(10); setGreeting
    Printer.EndDoc
IfNoErr:
Exit Sub
hell:
 TulisError Err.Description, Err.Number, "notaNo", Me.Name
 Resume IfNoErr

End Sub

Private Sub Init()
'On Error GoTo damn
Dim totalkes As Single
Dim total As Integer

    TxtTgl.Text = Format(Date, "dd")
    If Format(Date, "mm") = "01" Then
        TxtBulan.Text = "Januari"
    ElseIf Format(Date, "mm") = "02" Then
        TxtBulan.Text = "Februari"
    ElseIf Format(Date, "mm") = "03" Then
        TxtBulan.Text = "Maret"
    ElseIf Format(Date, "mm") = "04" Then
        TxtBulan.Text = "April"
    ElseIf Format(Date, "mm") = "05" Then
        TxtBulan.Text = "Mei"
    ElseIf Format(Date, "mm") = "06" Then
        TxtBulan.Text = "Juni"
    ElseIf Format(Date, "mm") = "07" Then
        TxtBulan.Text = "Juli"
    ElseIf Format(Date, "mm") = "08" Then
        TxtBulan.Text = "Agustus"
    ElseIf Format(Date, "mm") = "09" Then
        TxtBulan.Text = "September"
    ElseIf Format(Date, "mm") = "10" Then
        TxtBulan.Text = "Oktober"
    ElseIf Format(Date, "mm") = "11" Then
        TxtBulan.Text = "November"
    ElseIf Format(Date, "mm") = "12" Then
        TxtBulan.Text = "Desember"
    End If
    TxtTahun.Text = Format(Date, "yyyy")
    GridLaporan.Cols = 12
    GridLaporan.ColWidth(0) = 1000
    GridLaporan.ColWidth(1) = 1000
    GridLaporan.ColWidth(2) = 1000
    GridLaporan.ColWidth(3) = 1500
    GridLaporan.ColWidth(4) = 1000
    GridLaporan.ColWidth(5) = 1000
    GridLaporan.ColWidth(6) = 1000
    GridLaporan.ColWidth(7) = 1000
    GridLaporan.ColWidth(8) = 1000
    GridLaporan.ColWidth(9) = 1000
    GridLaporan.ColWidth(10) = 1000
    GridLaporan.ColWidth(11) = 1000
    
    GridLaporan.TextMatrix(0, 0) = "No.ID"
    GridLaporan.TextMatrix(0, 1) = setTanggal
    GridLaporan.TextMatrix(0, 2) = setClient
    GridLaporan.TextMatrix(0, 3) = setNamaUser
    GridLaporan.TextMatrix(0, 4) = setJenis
    GridLaporan.TextMatrix(0, 5) = setMulai
    GridLaporan.TextMatrix(0, 6) = setSelesai
    GridLaporan.TextMatrix(0, 7) = setDurasi
    GridLaporan.TextMatrix(0, 8) = "Total Jasa"
    GridLaporan.TextMatrix(0, 9) = "Belanja"
    GridLaporan.TextMatrix(0, 10) = "Operator"
    GridLaporan.TextMatrix(0, 11) = "Status"
    total = 0
    rec.Open "SELECT laporan.* FROM laporan WHERE laporan.tanggal = '" & Format(Date, "dd-mm-yyyy") & "'", conn, adOpenStatic, adLockOptimistic
    If Not rec.RecordCount = 0 Then
        GridLaporan.Rows = rec.RecordCount + 1
        rec.MoveFirst
        For i = 1 To rec.RecordCount
            GridLaporan.TextMatrix(i, 0) = rec(0) 'no nota
            GridLaporan.TextMatrix(i, 1) = rec(1) ' tanggal
            GridLaporan.TextMatrix(i, 2) = rec(2)  ' no client
            GridLaporan.TextMatrix(i, 3) = rec(3) 'nama user
            GridLaporan.TextMatrix(i, 4) = rec(10) 'mulai
            GridLaporan.TextMatrix(i, 5) = rec(4) 'mulai
            GridLaporan.TextMatrix(i, 6) = rec(5) 'selesai
            GridLaporan.TextMatrix(i, 7) = rec(6) ' duras
            GridLaporan.TextMatrix(i, 8) = rec(7) ' total
            GridLaporan.TextMatrix(i, 9) = rec(11) ' total
            GridLaporan.TextMatrix(i, 10) = rec(12) ' total
            GridLaporan.TextMatrix(i, 11) = rec(13) ' total
            totalkes = totalkes + rec(7)
            rec.MoveNext
        Next i
        totkes.Text = Format(totalkes, "#,###")

    Else
        GridLaporan.Rows = 1
    End If
    rec.Close
'IfNoErr:
'Exit Sub
'damn:
' TulisError Err.Description, Err.Number, "Init", Me.Name
' Resume IfNoErr

End Sub






Private Sub cboop_Click()
Call CekRekap
End Sub

Private Sub CmdCetakLaporan_Click()
On Error GoTo damn
    Printer.PrintQuality = 300
    Printer.FontSize = 10
    Printer.ScaleLeft = 10
    Printer.ScaleTop = 10
    Printer.Print Tab(10); FrmMain.Txtnama_warnet
    Printer.Print Tab(10); FrmMain.Txtalamat1
    Printer.Print Tab(10); FrmMain.Txtalamat2
    Printer.Print Tab(10); setLaporanRekap & Format(Now, "dd, mmmm yyyy")
    Printer.Print Tab(10); "-------------------------------------------------------------------------------------------------------------------------------------------------------------"
    Printer.Print Tab(10); setNo; Tab(20); setTanggal; Tab(35); setClient; Tab(45); setNamaUser; Tab(72); setMulai; Tab(88); setSelesai; Tab(100); setDurasi; Tab(120); setTotal
    Printer.Print Tab(10); "-------------------------------------------------------------------------------------------------------------------------------------------------------------"
    For i = 1 To GridLaporan.Rows - 1
        Printer.Print Tab(10); i; Tab(20); GridLaporan.TextMatrix(i, 1); Tab(35); GridLaporan.TextMatrix(i, 2); Tab(45); GridLaporan.TextMatrix(i, 3); Tab(72); GridLaporan.TextMatrix(i, 5); Tab(88); GridLaporan.TextMatrix(i, 6); Tab(100); GridLaporan.TextMatrix(i, 7); Tab(120); GridLaporan.TextMatrix(i, 8)
    Next i
    Printer.Print Tab(10); "-------------------------------------------------------------------------------------------------------------------------------------------------------------"
    Printer.Print Tab(80); setTotal; Tab(120); totkes.Text
    Printer.Print Tab(10); "-------------------------------------------------------------------------------------------------------------------------------------------------------------"
    Printer.Print Tab(10); "Di Cetak Oleh : " & FrmMain.nm.Text
    Printer.EndDoc
IfNoErr:
Exit Sub
damn:
 TulisError Err.Description, Err.Number, "CmdCetakLaporan", Me.Name
 Resume IfNoErr
End Sub

Private Sub CmdCetakNota_Click()
If GridLaporan.TextMatrix(GridLaporan.Row, 9) = "Yes" Then
notaYes
ElseIf GridLaporan.TextMatrix(GridLaporan.Row, 9) = "No" Then
notaNo
End If
End Sub

Private Sub cmdclr_Click()
Dim sqldel As String
If MsgBox("Anda yakin akan menghapus semua data Transaksi Yang Di Batalkan????", vbInformation + vbYesNo, "Confirm") = vbYes Then
sqldel = "Delete From laporan where laporan.status = '" & "Cancel" & "'"
conn.Execute sqldel
MsgBox "Data telah dihapus.", vbInformation + vbOKOnly, "Done"
CekRekap
Else
Exit Sub
End If
End Sub

Private Sub cmdExport_Click()
On Error GoTo damn
   FlexGrd_SaveToExcel GridLaporan, "The Header", "The Footer", 1, 16, App.path & "\logo.bmp", , , 37, 35, True
IfNoErr:
Exit Sub
damn:
 TulisError Err.Description, Err.Number, "", Me.Name
 Resume IfNoErr

End Sub

Private Sub CmdRefresh_Click()
    Call CekRekap
End Sub

Private Sub CmdTutup_Click()
    Unload Me
End Sub




Private Sub Form_Load()
'On Error GoTo damn
Init
laodop
StyleS
    TxtBulan.AddItem "Januari"
    TxtBulan.AddItem "Februari"
    TxtBulan.AddItem "Maret"
    TxtBulan.AddItem "April"
    TxtBulan.AddItem "Mei"
    TxtBulan.AddItem "Juni"
    TxtBulan.AddItem "Juli"
    TxtBulan.AddItem "Agustus"
    TxtBulan.AddItem "September"
    TxtBulan.AddItem "Oktober"
    TxtBulan.AddItem "November"
TxtBulan.AddItem "Desember"
TxtTgl.AddItem "01"
TxtTgl.AddItem "02"
TxtTgl.AddItem "03"
TxtTgl.AddItem "04"
TxtTgl.AddItem "05"
TxtTgl.AddItem "06"
TxtTgl.AddItem "07"
TxtTgl.AddItem "08"
TxtTgl.AddItem "09"
TxtTgl.AddItem "10"
TxtTgl.AddItem "11"
TxtTgl.AddItem "12"
TxtTgl.AddItem "13"
TxtTgl.AddItem "14"
TxtTgl.AddItem "15"
TxtTgl.AddItem "16"
TxtTgl.AddItem "17"
TxtTgl.AddItem "18"
TxtTgl.AddItem "19"
TxtTgl.AddItem "20"
TxtTgl.AddItem "21"
TxtTgl.AddItem "22"
TxtTgl.AddItem "23"
TxtTgl.AddItem "24"
TxtTgl.AddItem "25"
TxtTgl.AddItem "26"
TxtTgl.AddItem "27"
TxtTgl.AddItem "28"
TxtTgl.AddItem "29"
TxtTgl.AddItem "30"
TxtTgl.AddItem "31"
TxtTgl.AddItem "32????? Ada ngga?"
'IfNoErr:
'Exit Sub
'damn:
' TulisError Err.Description, Err.Number, "", Me.Name
' Resume IfNoErr

End Sub
Private Sub CekRekap()
'On Error GoTo damn
    Dim totalkes As Single
    Dim total As Integer
    Dim tgl As String
    Dim bln As String
    Dim thn As String
    Dim sql As String
    Dim opp As String
    If TxtBulan.Text = "Januari" Then
        bln = "01"
    ElseIf TxtBulan.Text = "Februari" Then
       bln = "02"
    ElseIf TxtBulan.Text = "Maret" Then
        bln = "03"
    ElseIf TxtBulan.Text = "April" Then
        bln = "04"
    ElseIf TxtBulan.Text = "Mei" Then
        bln = "05"
    ElseIf TxtBulan.Text = "Juni" Then
        bln = "06"
    ElseIf TxtBulan.Text = "Juli" Then
        bln = "07"
    ElseIf TxtBulan.Text = "Agustus" Then
        bln = "08"
    ElseIf TxtBulan.Text = "September" Then
        bln = "09"
    ElseIf TxtBulan.Text = "Oktober" Then
        bln = "10"
    ElseIf TxtBulan.Text = "November" Then
        bln = "11"
    ElseIf TxtBulan.Text = "Desember" Then
        bln = "12"
    End If
    tgl = TxtTgl.Text
    thn = TxtTahun.Text
    opp = cboop.Text
    total = 0
    If OpHari.value = True Then
        If OpSemua.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tanggal = '" & tgl & "-" & bln & "-" & thn & "'"
        ElseIf OpPersonal.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tanggal = '" & tgl & "-" & bln & "-" & thn & "' AND laporan.jenis = 'personal' AND laporan.status='ok'"
        ElseIf OpPelajar.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tanggal = '" & tgl & "-" & bln & "-" & thn & "' AND laporan.jenis = 'pelajar' AND laporan.status='ok'"
        ElseIf OpMember.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tanggal = '" & tgl & "-" & bln & "-" & thn & "' AND laporan.jenis = 'member' AND laporan.status='ok'"
        ElseIf OpGame.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tanggal = '" & tgl & "-" & bln & "-" & thn & "' AND laporan.jenis = 'game' AND laporan.status='ok'"
        ElseIf OpKetik.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tanggal = '" & tgl & "-" & bln & "-" & thn & "' AND laporan.jenis = 'ketik' AND laporan.status='ok'"
        ElseIf OpPay.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tanggal = '" & tgl & "-" & bln & "-" & thn & "' AND laporan.jenis = 'payfirst' AND laporan.status='ok'"
        ElseIf opop.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tanggal = '" & tgl & "-" & bln & "-" & thn & "' AND laporan.op = '" & cboop.Text & "' AND laporan.status='ok'"
        ElseIf opbat.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tanggal = '" & tgl & "-" & bln & "-" & thn & "' AND laporan.status='Cancel'"
        Else
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tanggal = '" & tgl & "-" & bln & "-" & thn & "' AND laporan.status='ok'"
        End If
    ElseIf OpBulan.value = True Then
        If OpSemua.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.bulan = '" & bln & "' AND laporan.tahun = '" & thn & "'"
        ElseIf OpPersonal.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.bulan = '" & bln & "' AND laporan.tahun = '" & thn & "' AND laporan.jenis = 'personal'  AND laporan.status='ok'"
        ElseIf OpMember.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.bulan = '" & bln & "' AND laporan.tahun = '" & thn & "' AND laporan.jenis = 'member'  AND laporan.status='ok'"
        ElseIf OpPelajar.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.bulan = '" & bln & "' AND laporan.tahun = '" & thn & "' AND laporan.jenis = 'pelajar'  AND laporan.status='ok'"
        ElseIf OpGame.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.bulan = '" & bln & "' AND laporan.tahun = '" & thn & "' AND laporan.jenis = 'game'  AND laporan.status='ok'"
        ElseIf OpKetik.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.bulan = '" & bln & "' AND laporan.tahun = '" & thn & "' AND laporan.jenis = 'ketik'  AND laporan.status='ok'"
        ElseIf OpPay.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.bulan = '" & bln & "' AND laporan.tahun = '" & thn & "' AND laporan.jenis = 'payfirst'  AND laporan.status='ok'"
        ElseIf opbat.value = True Then
             sql = "SELECT laporan.* FROM laporan WHERE laporan.bulan = '" & bln & "' AND laporan.tahun = '" & thn & "' AND laporan.status='Cancel'"
        ElseIf opop.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.bulan = '" & bln & "' AND laporan.tahun = '" & thn & "' AND laporan.op = '" & cboop.Text & "'  AND laporan.status='ok'"
        Else
            sql = "SELECT laporan.* FROM laporan WHERE laporan.bulan = '" & bln & "' AND laporan.tahun = '" & thn & "' AND laporan.status='ok'"
        End If
    ElseIf OpTahun.value = True Then
        If OpSemua.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tahun = '" & thn & "'"
        ElseIf OpPersonal.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tahun = '" & thn & "' AND laporan.jenis = 'personal' AND laporan.status='ok'"
        ElseIf OpPelajar.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tahun = '" & thn & "' AND laporan.jenis = 'pelajar' AND laporan.status='ok'"
        ElseIf OpMember.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tahun = '" & thn & "' AND laporan.jenis = 'member'  AND laporan.status='ok'"
        ElseIf OpGame.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tahun = '" & thn & "' AND laporan.jenis = 'game'  AND laporan.status='ok'"
        ElseIf OpKetik.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tahun = '" & thn & "' AND laporan.jenis = 'ketik'  AND laporan.status='ok'"
        ElseIf OpPay.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tahun = '" & thn & "' AND laporan.jenis = 'payfirst'  AND laporan.status='ok'"
        ElseIf opbat.value = True Then
              sql = "SELECT laporan.* FROM laporan WHERE laporan.tahun = '" & thn & "' AND laporan.status='Cancel'"
        ElseIf opop.value = True Then
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tahun= '" & thn & "' AND laporan.op = '" & cboop.Text & "'  AND laporan.status='ok'"


        Else
            sql = "SELECT laporan.* FROM laporan WHERE laporan.tahun = '" & thn & "'  AND laporan.status='ok'"
        End If
    Else
        sql = "SELECT laporan.* FROM laporan WHERE laporan.tanggal = '" & tgl & "-" & bln & "-" & thn & "'  AND laporan.status='ok'"
    End If
    rec.Open sql, conn, adOpenStatic, adLockOptimistic
    If Not rec.RecordCount = 0 Then
        GridLaporan.Rows = rec.RecordCount + 1
        rec.MoveFirst
        For i = 1 To rec.RecordCount
            GridLaporan.TextMatrix(i, 0) = rec(0) 'no nota
            GridLaporan.TextMatrix(i, 1) = rec(1) ' tanggal
            GridLaporan.TextMatrix(i, 2) = rec(2)  ' no client
            GridLaporan.TextMatrix(i, 3) = rec(3) 'nama user
            GridLaporan.TextMatrix(i, 4) = rec(10) 'mulai
            GridLaporan.TextMatrix(i, 5) = rec(4) 'mulai
            GridLaporan.TextMatrix(i, 6) = rec(5) 'selesai
            GridLaporan.TextMatrix(i, 7) = rec(6) ' duras
            GridLaporan.TextMatrix(i, 8) = rec(7) ' total
            GridLaporan.TextMatrix(i, 9) = rec(11) ' 'belanja
            GridLaporan.TextMatrix(i, 10) = rec(12) ' 'belanja
            GridLaporan.TextMatrix(i, 11) = rec(13) ' 'belanja
            totalkes = totalkes + rec(7)
            rec.MoveNext
        Next i
        
        totkes.Text = Format(totalkes, "#,###")

    Else
        GridLaporan.Rows = 1
    End If
    rec.Close
'IfNoErr:
'Exit Sub
'damn:
' TulisError Err.Description, Err.Number, "Rekap", Me.Name
' Resume IfNoErr

End Sub





Private Sub opbat_Click()
Call CekRekap
End Sub

Private Sub OpBulan_Click()
    Call CekRekap
End Sub

Private Sub OpGame_Click()
    Call CekRekap
End Sub

Private Sub OpHari_Click()
    Call CekRekap
End Sub

Private Sub OpKetik_Click()
    Call CekRekap
End Sub

Private Sub OpMember_Click()
    Call CekRekap
End Sub

Private Sub opop_Click()
Call CekRekap
End Sub

Private Sub OpPay_Click()
Call CekRekap
End Sub

Private Sub OpPelajar_Click()
Call CekRekap
End Sub

Private Sub OpPersonal_Click()
    Call CekRekap
End Sub

Private Sub OpSemua_Click()
    Call CekRekap
End Sub

Private Sub OpTahun_Click()
    Call CekRekap
End Sub

Private Sub TxtBulan_Click()
    Call CekRekap
End Sub

Private Sub TxtTahun_Click()
    Call CekRekap
End Sub

Private Sub TxtTgl_Click()
    Call CekRekap
End Sub
Private Sub StyleS()
On Error Resume Next
Dim ctrl As Control
For Each ctrl In Controls
If FrmStyles.txtnamastyle.Text = "Default" Then
Exit Sub
Else
    If (TypeOf ctrl Is ButtonNix) And _
        ctrl.Name <> "cmdSwitchStyle" Then
        ctrl.ButtonType = FrmStyles.txtlButtonType.Text
        ctrl.ColorScheme = FrmStyles.txtlColorScheme.Text
        ctrl.Backcolor = FrmStyles.txtlBackcolor.Text
        ctrl.BackOver = FrmStyles.txtlBackOver.Text
        ctrl.Forecolor = FrmStyles.txtlForecolor.Text
        ctrl.ForeOver = FrmStyles.txtlForeOver.Text
       
    End If
        If (TypeOf ctrl Is BLacKFrame) And _
        ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.BackColor1 = FrmStyles.frameBackColor1.Text
         ctrl.BackColor2 = FrmStyles.frameBackColor2.Text
         ctrl.BorderColor = FrmStyles.frameBorderColor.Text
         ctrl.Forecolor = FrmStyles.frameForecolor.Text
         ctrl.TitleColor1 = FrmStyles.frameTitleColor1.Text
         ctrl.TitleColor2 = FrmStyles.frameTitleColor2.Text
         If FrmStyles.frameBackGradient.Text = 0 Then
         ctrl.BackGradient = None
         ElseIf FrmStyles.frameBackGradient.Text = 1 Then
         ctrl.BackGradient = Vertical
         ElseIf FrmStyles.frameBackGradient.Text = 2 Then
         ctrl.BackGradient = Horizontal
         End If
         
         If FrmStyles.Frametitlegradient.Text = 0 Then
         ctrl.TitleGradient = None
         ElseIf FrmStyles.Frametitlegradient.Text = 1 Then
         ctrl.TitleGradient = Vertical
         ElseIf FrmStyles.Frametitlegradient.Text = 2 Then
         ctrl.TitleGradient = Horizontal
         End If

    End If
        If (TypeOf ctrl Is BLacKText) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.TForecolor.Text
         ctrl.Backcolor = FrmStyles.TBackcolor.Text
         ctrl.BackColorMain = FrmStyles.TBackColorMain.Text
         ctrl.BorderColor = FrmStyles.TBorderColor.Text
         ctrl.FocusBackColor = FrmStyles.TFocusBackColor.Text
         ctrl.FocusBackMainColor = FrmStyles.TFocusBackMainColor.Text
         ctrl.FocusBorderColor = FrmStyles.TFocusBorderColor.Text
         ctrl.FocusForeColor = FrmStyles.TFocusForeColor.Text
    End If
        If (TypeOf ctrl Is MSFlexGrid) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Backcolor = FrmStyles.GDBackcolor.Text
         ctrl.BackColorBkg = FrmStyles.GDBackColorBkg.Text
         ctrl.BackColorSel = FrmStyles.GDBackColorSel.Text
         ctrl.BackColorFixed = FrmStyles.GDBackColorFixed.Text
         ctrl.ForeColorSel = FrmStyles.GDForeColorSel.Text
         ctrl.Forecolor = FrmStyles.GDForecolor.Text
         ctrl.ForeColorFixed = FrmStyles.GDForeColorFixed.Text
         ctrl.GridColor = FrmStyles.GDGridColor.Text
         ctrl.GridColorFixed = FrmStyles.GDGridColorFixed.Text
    End If
        If (TypeOf ctrl Is TextBox) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.lbltextfore.Text
         ctrl.Backcolor = FrmStyles.lbltextback.Text
    End If
        If (TypeOf ctrl Is ComboBox) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.cboForeColor.Text
         ctrl.Backcolor = FrmStyles.cboBackcolor.Text
    End If
        If (TypeOf ctrl Is Label) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.lblForeColor.Text
    End If
        If (TypeOf ctrl Is RichTextBox) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Backcolor = FrmStyles.RcBackcolor.Text
    End If
    
            If (TypeOf ctrl Is OptionButton) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.opForecolor.Text
         ctrl.Backcolor = FrmStyles.opBackcolor.Text
    End If
            If (TypeOf ctrl Is ListView) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Backcolor = FrmStyles.LBackColor.Text
    End If
    Me.Backcolor = FrmStyles.WFore.Text
    End If
Next ctrl
End Sub



Private Sub laodop()
'On Error GoTo hell
rec.Open "useraccount", conn, adOpenStatic, adLockOptimistic
If rec.RecordCount = 0 Then
rec.Close
Exit Sub
Else
rec.MoveFirst
While Not rec.EOF
cboop.AddItem rec(1)
rec.MoveNext
Wend
rec.Close
End If

'IfNoErr:
'Exit Sub
'hell:
' TulisError Err.Description, Err.Number, "loadop", Me.Name
' Resume IfNoErr

End Sub

